home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 February: Tool Chest / Dev.CD Feb 94.toast / Tool Chest / Development Platforms / AppsToGo / AppsToGo.src / AppsToGo.Changes / DTS.Draw / TRectObj.c.df < prev    next >
Encoding:
Text File  |  1993-06-18  |  8.9 KB  |  221 lines  |  [TEXT/MPS ]

  1. File #1: b:-archives:93/03/25.Dev.CD.Version:AppsToGo.CD:DTS.Draw:TRectObj.c
  2. File #2: a:Desktop Folder:AppsToGo.src:DTS.Draw:TRectObj.c
  3.  
  4. Nonmatching lines (File "b:-archives:93/03/25.Dev.CD.Version:AppsToGo.CD:DTS.Draw:TRectObj.c"; Line 7; File "a:Desktop Folder:AppsToGo.src:DTS.Draw:TRectObj.c"; Line 7)
  5. ** Copyright © 1992 Apple Computer, Inc.
  6.  
  7. ** Copyright © 1992-1993 Apple Computer, Inc.
  8.  
  9.  
  10. Extra lines in 2nd before 11 in 1st (File "b:-archives:93/03/25.Dev.CD.Version:AppsToGo.CD:DTS.Draw:TRectObj.c"; Line Δ11; File "a:Desktop Folder:AppsToGo.src:DTS.Draw:TRectObj.c"; Line 11:18)
  11. /* You may incorporate this sample code into your applications without
  12. ** restriction, though the sample code has been provided "AS IS" and the
  13. ** responsibility for its operation is 100% yours.  However, what you are
  14. ** not permitted to do is to redistribute the source as "DSC Sample Code"
  15. ** after having made changes. If you're going to re-distribute the source,
  16. ** we require that you make it clear in the source that the code was
  17. ** descended from Apple Sample Code, but that you've made changes. */
  18.  
  19.  
  20.  
  21. Nonmatching lines (File "b:-archives:93/03/25.Dev.CD.Version:AppsToGo.CD:DTS.Draw:TRectObj.c"; Line 55:69; File "a:Desktop Folder:AppsToGo.src:DTS.Draw:TRectObj.c"; Line 63:89)
  22. #pragma segment DrawObjects
  23. long    TRectObj(TreeObjHndl hndl, short message, long data)
  24. {
  25.     TreeObjHndl            root, shndl;
  26.     Rect                rct, oldRct, *rptr, grabber;
  27.     short                hit, fileRefNum, dx1, dx2, dy1, dy2, h, v, ptype;
  28.     short                fv, fh, flip;
  29.     Point                where, begMouse, curMouse, offset;
  30.     Boolean                selected;
  31.     EventRecord            option;
  32.     ClickInfo            *click;
  33.     RgnHandle            rgn;
  34.     OSErr                err;
  35. #if VH_VERSION
  36.     char                *cptr;
  37.  
  38. RGBColor    gBorderColor  = {0, 0, 0};
  39. RGBColor    gContentColor = {0xFFFF, 0xFFFF, 0xFFFF};
  40. short        gPenHeight = 1;
  41. short        gPenWidth  = 1;
  42.  
  43.  
  44.  
  45. /**********************************************************************/
  46.  
  47.  
  48.  
  49. #pragma segment DrawObjects
  50. long    TRectObj(TreeObjHndl hndl, short message, long data)
  51. {
  52.     TreeObjHndl    root, shndl;
  53.     Rect        rct, oldRct, *rptr, grabber;
  54.     short        hit, fileRefNum, dx1, dx2, dy1, dy2, h, v, ptype;
  55.     short        fv, fh, flip, noDraw, w;
  56.     Point        where, begMouse, curMouse, offset;
  57.     Boolean        selected;
  58.     EventRecord    option;
  59.     ClickInfo    *click;
  60.     RgnHandle    rgn;
  61.     OSErr        err;
  62.     RGBColor    rgb, rgb2;
  63. #if VH_VERSION
  64.     char        *cptr;
  65.  
  66.  
  67. Extra lines in 2nd before 86 in 1st (File "b:-archives:93/03/25.Dev.CD.Version:AppsToGo.CD:DTS.Draw:TRectObj.c"; Line Δ86; File "a:Desktop Folder:AppsToGo.src:DTS.Draw:TRectObj.c"; Line 106:110)
  68.             mDerefCommon(hndl)->penHeight    = gPenHeight;
  69.             mDerefCommon(hndl)->penWidth     = gPenWidth;
  70.             mDerefCommon(hndl)->borderColor  = gBorderColor;
  71.             mDerefCommon(hndl)->content      = true;
  72.             mDerefCommon(hndl)->contentColor = gContentColor;
  73.  
  74.  
  75. Extra lines in 1st before 217 in 2nd (File "b:-archives:93/03/25.Dev.CD.Version:AppsToGo.CD:DTS.Draw:TRectObj.c"; Line 192; File "a:Desktop Folder:AppsToGo.src:DTS.Draw:TRectObj.c"; Line Δ217)
  76.             rct   = mDerefCommon(hndl)->rect;
  77.  
  78.  
  79. Extra lines in 2nd before 197 in 1st (File "b:-archives:93/03/25.Dev.CD.Version:AppsToGo.CD:DTS.Draw:TRectObj.c"; Line Δ197; File "a:Desktop Folder:AppsToGo.src:DTS.Draw:TRectObj.c"; Line 221)
  80.                     DoTreeObjMethod(hndl, GETBBOXMESSAGE, (long)&rct);
  81.  
  82.  
  83. Extra lines in 2nd before 205 in 1st (File "b:-archives:93/03/25.Dev.CD.Version:AppsToGo.CD:DTS.Draw:TRectObj.c"; Line Δ205; File "a:Desktop Folder:AppsToGo.src:DTS.Draw:TRectObj.c"; Line 230)
  84.                     rct = mDerefCommon(hndl)->rect;
  85.  
  86.  
  87. Extra lines in 2nd before 293 in 1st (File "b:-archives:93/03/25.Dev.CD.Version:AppsToGo.CD:DTS.Draw:TRectObj.c"; Line Δ293; File "a:Desktop Folder:AppsToGo.src:DTS.Draw:TRectObj.c"; Line 319)
  88.         case GETOBJRECTMESSAGE:
  89.  
  90.  
  91. Nonmatching lines (File "b:-archives:93/03/25.Dev.CD.Version:AppsToGo.CD:DTS.Draw:TRectObj.c"; Line 298; File "a:Desktop Folder:AppsToGo.src:DTS.Draw:TRectObj.c"; Line 325)
  92.         case SETBBOXMESSAGE:
  93.  
  94.         case SETOBJRECTMESSAGE:
  95.  
  96.  
  97. Nonmatching lines (File "b:-archives:93/03/25.Dev.CD.Version:AppsToGo.CD:DTS.Draw:TRectObj.c"; Line 303; File "a:Desktop Folder:AppsToGo.src:DTS.Draw:TRectObj.c"; Line 330)
  98.         case SECTBBOXMESSAGE:
  99.  
  100.         case SECTOBJRECTMESSAGE:
  101.  
  102.  
  103. Extra lines in 1st before 336 in 2nd (File "b:-archives:93/03/25.Dev.CD.Version:AppsToGo.CD:DTS.Draw:TRectObj.c"; Line 309:311; File "a:Desktop Folder:AppsToGo.src:DTS.Draw:TRectObj.c"; Line Δ336)
  104.         case TARGETMESSAGE:
  105.             break;
  106.  
  107.  
  108.  
  109. Extra lines in 2nd before 314 in 1st (File "b:-archives:93/03/25.Dev.CD.Version:AppsToGo.CD:DTS.Draw:TRectObj.c"; Line Δ314; File "a:Desktop Folder:AppsToGo.src:DTS.Draw:TRectObj.c"; Line 338:340)
  110.             h   = mDerefCommon(hndl)->penHeight;
  111.             w   = mDerefCommon(hndl)->penWidth;
  112.             PenSize(w, h);
  113.  
  114.  
  115. Nonmatching lines (File "b:-archives:93/03/25.Dev.CD.Version:AppsToGo.CD:DTS.Draw:TRectObj.c"; Line 316:317; File "a:Desktop Folder:AppsToGo.src:DTS.Draw:TRectObj.c"; Line 343:358)
  116.                     FillRect(&rct, (ConstPatternParam)&qd.white);
  117.                     FrameRect(&rct);
  118.  
  119.                     if (gQDVersion)
  120.                         GetForeColor(&rgb);
  121.                     ForeColor(whiteColor);
  122.                     if (gQDVersion) {
  123.                         rgb2 = mDerefLine(hndl)->contentColor;
  124.                         RGBForeColor(&rgb2);
  125.                     }
  126.                     PaintRect(&rct);
  127.                     ForeColor(blackColor);
  128.                     if (gQDVersion) {
  129.                         rgb2 = mDerefLine(hndl)->borderColor;
  130.                         RGBForeColor(&rgb2);
  131.                     }
  132.                     FrameRect(&rct);
  133.                     if (gQDVersion)
  134.                         RGBForeColor(&rgb);
  135.  
  136.  
  137. Extra lines in 1st before 377 in 2nd (File "b:-archives:93/03/25.Dev.CD.Version:AppsToGo.CD:DTS.Draw:TRectObj.c"; Line 336; File "a:Desktop Folder:AppsToGo.src:DTS.Draw:TRectObj.c"; Line Δ377)
  138.                     PenNormal();
  139.  
  140.  
  141. Extra lines in 2nd before 342 in 1st (File "b:-archives:93/03/25.Dev.CD.Version:AppsToGo.CD:DTS.Draw:TRectObj.c"; Line Δ342; File "a:Desktop Folder:AppsToGo.src:DTS.Draw:TRectObj.c"; Line 382)
  142.             PenNormal();
  143.  
  144.  
  145. Nonmatching lines (File "b:-archives:93/03/25.Dev.CD.Version:AppsToGo.CD:DTS.Draw:TRectObj.c"; Line 354; File "a:Desktop Folder:AppsToGo.src:DTS.Draw:TRectObj.c"; Line 395)
  146.             ccat   (cptr, "  $00: selected = ");
  147.  
  148.             ccat   (cptr, "  $00: selected     = ");
  149.  
  150.  
  151. Nonmatching lines (File "b:-archives:93/03/25.Dev.CD.Version:AppsToGo.CD:DTS.Draw:TRectObj.c"; Line 358; File "a:Desktop Folder:AppsToGo.src:DTS.Draw:TRectObj.c"; Line 399)
  152.             ccat   (cptr, "  $02: rect     = ($");
  153.  
  154.             ccat   (cptr, "  $02: rect         = ($");
  155.  
  156.  
  157. Extra lines in 2nd before 367 in 1st (File "b:-archives:93/03/25.Dev.CD.Version:AppsToGo.CD:DTS.Draw:TRectObj.c"; Line Δ367; File "a:Desktop Folder:AppsToGo.src:DTS.Draw:TRectObj.c"; Line 408:432)
  158.             ccatchr(cptr, 13, 1);
  159.             ccat   (cptr, "  $0A: penHeight    = ");
  160.             ccatdec(cptr, mDerefRect(hndl)->penHeight);
  161.             ccatchr(cptr, 13, 1);
  162.             ccat   (cptr, "  $0C: penWidth    = ");
  163.             ccatdec(cptr, mDerefRect(hndl)->penWidth);
  164.             ccatchr(cptr, 13, 1);
  165.             ccat   (cptr, "  $0E: borderColor  = ($");
  166.             ccathex(cptr, 0, 4, 4, mDerefRect(hndl)->borderColor.red);
  167.             ccat   (cptr, ",$");
  168.             ccathex(cptr, 0, 4, 4, mDerefRect(hndl)->borderColor.green);
  169.             ccat   (cptr, ",$");
  170.             ccathex(cptr, 0, 4, 4, mDerefRect(hndl)->borderColor.blue);
  171.             ccat   (cptr, ")");
  172.             ccatchr(cptr, 13, 1);
  173.             ccat   (cptr, "  $1$: content      = ($");
  174.             ccatdec(cptr, mDerefRect(hndl)->content);
  175.             ccatchr(cptr, 13, 1);
  176.             ccat   (cptr, "  $16: contentColor = ($");
  177.             ccathex(cptr, 0, 4, 4, mDerefRect(hndl)->contentColor.red);
  178.             ccat   (cptr, ",$");
  179.             ccathex(cptr, 0, 4, 4, mDerefRect(hndl)->contentColor.green);
  180.             ccat   (cptr, ",$");
  181.             ccathex(cptr, 0, 4, 4, mDerefRect(hndl)->contentColor.blue);
  182.             ccat   (cptr, ")");
  183.  
  184.  
  185. Extra lines in 2nd before 371 in 1st (File "b:-archives:93/03/25.Dev.CD.Version:AppsToGo.CD:DTS.Draw:TRectObj.c"; Line Δ371; File "a:Desktop Folder:AppsToGo.src:DTS.Draw:TRectObj.c"; Line 437:440)
  186.         case COMPAREMESSAGE:
  187.             return(DefaultEqualTreeObjData(hndl, (TreeObjHndl)data));
  188.             break;
  189.  
  190.  
  191.  
  192. Extra lines in 2nd before 397 in 1st (File "b:-archives:93/03/25.Dev.CD.Version:AppsToGo.CD:DTS.Draw:TRectObj.c"; Line Δ397; File "a:Desktop Folder:AppsToGo.src:DTS.Draw:TRectObj.c"; Line 467:469)
  193.             noDraw = (data & SELECTNODRAW);
  194.             data  ^= noDraw;
  195.  
  196.  
  197.  
  198. Nonmatching lines (File "b:-archives:93/03/25.Dev.CD.Version:AppsToGo.CD:DTS.Draw:TRectObj.c"; Line 399:401; File "a:Desktop Folder:AppsToGo.src:DTS.Draw:TRectObj.c"; Line 472:476)
  199.                 mDerefCommon(hndl)->selected = true;
  200.                 DoTreeObjMethod(hndl, DRAWMESSAGE, DRAWSELECT);
  201.                     /* Force a draw-toggle of the selection grabbers. */
  202.  
  203.                 if (!noDraw) {
  204.                     mDerefCommon(hndl)->selected = true;
  205.                     DoTreeObjMethod(hndl, DRAWMESSAGE, DRAWSELECT);
  206.                         /* Force a draw-toggle of the selection grabbers. */
  207.                 }
  208.  
  209.  
  210. Nonmatching lines (File "b:-archives:93/03/25.Dev.CD.Version:AppsToGo.CD:DTS.Draw:TRectObj.c"; Line 418; File "a:Desktop Folder:AppsToGo.src:DTS.Draw:TRectObj.c"; Line 493)
  211.             DoTreeObjMethod(hndl, GETBBOXMESSAGE, (long)&oldRct);
  212.  
  213.             DoTreeObjMethod(hndl, GETOBJRECTMESSAGE, (long)&oldRct);
  214.  
  215.  
  216. Extra lines in 2nd before 431 in 1st (File "b:-archives:93/03/25.Dev.CD.Version:AppsToGo.CD:DTS.Draw:TRectObj.c"; Line Δ431; File "a:Desktop Folder:AppsToGo.src:DTS.Draw:TRectObj.c"; Line 506)
  217.             if ((*hndl)->type == EXTSELECTOBJ) option.modifiers = 0;
  218.  
  219.  
  220. *** EOF on both files at the same time ***
  221.